/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SensorCheckersImpl;

import SensorCheckerInterface.ISensorChecker;
import CommonValue.Humidity;
import DTO.SensorDTO;

/**
 *
 * @author Administrator
 */
public class HumiditySensorChecker extends BaseSensorChecker implements ISensorChecker{

    public HumiditySensorChecker() {
        setSensorCheckerSign(Humidity.SIGN);
    }

    @Override
    public boolean CheckSensor(SensorDTO o) {
        System.out.println("Check : "+getSensorCheckerSign());
        float humidity = o.getData().get(Humidity.HUMIDITY);
        System.out.println(Humidity.HUMIDITY + " : "+ humidity);
        if (humidity<Humidity.HUMIDITY_MIN || humidity>Humidity.HUMIDITY_MAX ) return false;// tuyet hoac mua 
        return true;
    }
    
}
